﻿using System.Collections.Generic;

namespace Vestras.StarCraft2.Luna.Parser.Ast {
    public sealed class TypeReference : Entity {
        List<Expression> arrayDimensionExpressons = new List<Expression>();

        public override Entity Parent { get; internal set; }
        public Expression Type { get; internal set; }
        public List<Expression> ArrayDimensionExpressions {
            get {
                return arrayDimensionExpressons;
            }
            internal set {
                arrayDimensionExpressons = value;
            }
        }

        public TypeReference() { }
        public TypeReference(Expression type) {
            Type = type;
        }

        public override string ToString() {
            return GetType().Name + " Type = [ " + Type + " ], ArrayDimensionExpressions = [ " + ArrayDimensionExpressions + " ]";
        }
    }
}
